//
//  NRWCarInputItemView.h
//  New_Runway
//
//  Created by NewLife on 2018/2/26.
//  Copyright © 2018年 NelsonJ. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, GenderItemSubItemType) {
    GenderItemSubItemTypeMan,
    GenderItemSubItemTypeWoman,
};

@class NRWCarInputItemView;

@protocol NRWCarInputItemViewDelegate<NSObject>

@optional
- (void)genderItemSubItemDidClickWithType:(GenderItemSubItemType)type;

- (void)inputItemView:(NRWCarInputItemView *)view textFieldTextDidChange:(UITextField *)sender;

@end

@interface NRWCarInputItemView : UIView

@property (weak, nonatomic) id<NRWCarInputItemViewDelegate> delegate;

@property (copy, nonatomic) NSAttributedString *titleAttributedString;

@property (copy, nonatomic) NSString *titleString;

@property (assign, nonatomic) CGFloat titleRectOffset;

@property (assign, nonatomic) UIKeyboardType keyboardType;

//输入框
- (instancetype)initWithInputItemWithPlaceHolder:(NSString *)placeHolder delegate:(id<UITextFieldDelegate>)delegate showArrow:(BOOL)show;

/**< 获取 设置 输入框文本内容 */
@property (copy, nonatomic) NSString *inputText;

//性别选择
- (instancetype)initWithTwoChooseItemWithTitle1:(NSString *)title1 title2:(NSString *)title2;

/**< 获取 设置 选中index */
@property (assign, nonatomic) NSInteger chooseIndex;

//价格区间
- (instancetype)initWithPriceRangeWithTextFieldDelegate:(id<UITextFieldDelegate>)delegate;

@property (assign, nonatomic) CGFloat minPrice;
@property (assign, nonatomic) CGFloat maxPrice;
@property (strong, nonatomic, readonly) UITextField *minPriceTextField;
@property (strong, nonatomic, readonly) UITextField *maxPriceTextField;

@end
